<template>
  <div>
      <a-result status="403" title="403" sub-title="未分配权限访问，请联系管理员">
        <template #extra>
          <a-button type="primary" @click="toPath">
           返回登录
          </a-button>
        </template>
      </a-result>
  </div>
</template>

<script>
  import { mapActions } from 'vuex'
export default {
  name: '404',
  methods:{
    ...mapActions(['Logout']),
    toPath(){
     this.Logout({}).then(() => {
        localStorage.clear();
        setTimeout(() => {
          window.location.reload()
        }, 1000)
      }).catch(err => {
        this.$message.error({
          title: '错误',
          description: err.message
        })
      })
    }
  }
}

</script>
